<template>
    <view class="props_card">
        <view class="props_card_text"> 温馨提示：发起拼团后，需在{{ getPeriod() }}内成团，超时未成团拼团失败~ </view>
    </view>
</template>

<script setup>
const props = defineProps({
    state: {
        type: Object,
        default: () => ({})
    }
});
const getPeriod = () => {
    let timeArr = props.state.activity?.spellActivityGroupInfo?.spellGroupExpireAt || [];
    if (timeArr.length > 0) {
        let d = +timeArr[0];
        let h = +timeArr[1];
        let m = +timeArr[2];
        return `${d ? `${d}天` : ''}${h ? `${h}小时` : ''}${m ? `${m}分钟` : ''}`;
    }
    return '';
};
</script>

<style lang="scss" scoped>
.props_card {
    padding: 16rpx 32rpx;
    background: #ffeded;
    font-size: 22rpx;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #fe292b;
}
</style>
